package com.aixin.csopuser.controller;


import com.aixin.common.core.domain.model.LoginUser;
import com.aixin.common.utils.ServletUtils;
import com.aixin.csopuser.domain.*;
import com.aixin.csopuser.domain.dto.SupplierCustomerDTO;
import com.aixin.csopuser.domain.vo.CustomerServiceConsumeQuery;
import com.aixin.csopuser.model.*;
import com.aixin.csopuser.service.CustomerService;
import com.aixin.csopuser.service.CustomerServiceConsumeService;
import com.aixin.framework.web.service.TokenService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/customer-service-consume")
@EnableAutoConfiguration
public class CustomerServiceConsumeController {

    @Autowired
    private CustomerServiceConsumeService serviceConsumeService;

    @GetMapping("/query")
    public ResponseEntity<Page<SupplierCustomerDTO>> query(CustomerServiceConsumeQuery query, Pageable pageable) {
        return ResponseEntity.ok().body(serviceConsumeService.queryList(query, pageable));
    }
}
